load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "io",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "lib": {"name": "io"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-io",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    os_deps = [
        (
            "macos",
            [
                "fbsource//third-party/rust:termios",
            ],
        ),
        (
            "linux",
            [
                "fbsource//third-party/rust:termios",
            ],
        ),
    ],
    deps = [
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:parking_lot",
        "fbsource//third-party/rust:pipe",
        "fbsource//third-party/rust:terminal_size",
        "fbsource//third-party/rust:termwiz",
        "//eden/scm/lib/config/model:configmodel",
        "//eden/scm/lib/spawn-ext:spawn-ext",
        "//eden/scm/lib/third-party/streampager:streampager",
        "//eden/scm/lib/util/hgplain:hgplain",
        "//eden/scm/lib/util/time-interval:time-interval",
    ],
)
